.TH remove 3 "" "" ""
.SH SYNOPSIS
remove \- delete a file's name
.SH ANSI_SYNOPSIS
#include <stdio.h>
.br
int remove(char *
.IR filename );
.br

int _remove_r(void *
.IR reent ,
char *
.IR filename );
.br
.SH TRAD_SYNOPSIS
#include <stdio.h>
.br
int remove(
.IR filename )
.br
char *
.IR filename ;
.br

int _remove_r(
.IR reent ,
.IR filename )
.br
char *
.IR reent ;
.br
char *
.IR filename ;
.br
.SH DESCRIPTION
Use 
.BR remove 
to dissolve the association between a particular
filename (the string at 
.IR filename )
and the file it represents.
After calling 
.BR remove 
with a particular filename, you will no
longer be able to open the file by that name.

In this implementation, you may use 
.BR remove 
on an open file without
error; existing file descriptors for the file will continue to access
the file's data until the program using them closes the file.

The alternate function 
.BR _remove_r 
is a reentrant version. The
extra argument 
.IR reent 
is a pointer to a reentrancy structure.
.SH RETURNS
.BR remove 
returns 
.BR 0 
if it succeeds, 
.BR -1 
if it fails.
.SH PORTABILITY
ANSI C requires 
.BR remove ,
but only specifies that the result on
failure be nonzero. The behavior of 
.BR remove 
when you call it on an
open file may vary among implementations.

Supporting OS subroutine required: 
.BR unlink .
.SH SOURCE
src/newlib/libc/stdio/remove.c
